using DotNetty.Buffers;
using QQ.Client;
using QQ.Codecs;
using static QQ.Codecs.DotNettyByteBufferExtensions.LengthType;

namespace QQ.Packet.Response.TLV
{
    public class TLV0x11a : IResponse
    {
        public short face { get; private set; }
        public byte age { get; private set; }
        public byte gender { get; private set; }
        public string nick { get; private set; }
        private readonly QQDeviceConfig config;
        public TLV0x11a(QQDeviceConfig config)
        {
            this.config = config;
        }
        public void Deserialize(IByteBuffer buffer)
        {
            face = buffer.ReadShort();
            age = buffer.ReadByte();
            gender = buffer.ReadByte();
            nick = buffer.ReadBytesWithLength(BYTE).GetString();
        }
    }
}